home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Browsing & Building Cyberspace
/
VRML - Browsing and Building Cyberspace.iso
/
examples
/
fifth.wrl
< prev
next >
Wrap
Text File
|
1995-06-13
|
895b
|
41 lines
#VRML V1.0 ascii
# Example five- using the Transform node, creating the Earth
# Here comes the Sun
# The Separator node groups everything within it together
Separator {
# The material will effect all subsequent nodes
# The sun is yellow, isn't it? Additive color means red + green = yellow
# We're switching to emissive color because the Sun gives off light.
Material {
emissiveColor 1 1 0 # The Sun emits lots of yellow light
}
Sphere {
radius 10 # Big Sun
}
# We place the Earth within it's own Separator
# To keep everything good and isolated
Separator {
# Let's move things out of the way here
Transform {
translation 0 20 20
}
# Color the Earth blue, and make it absorb light
Material {
diffuseColor 0 0 1 # Big blue marble
}
# Finally, create the earth
Sphere {
radius 2 # Little Earth
}
}
}